<form method="post" class="form-x one-form form-auto" id="form" action="{:U('/SinglePage/runAddPage',array('id'=>$page['id']))}">
	 <div class="panel one-box  active">
        <div class="panel-head">
			<if condition='ACTION_NAME eq "addPage"'>	
            <strong>添加单页</strong>
			<else/>
			<strong>修改单页</strong>
			</if>
        </div>
        <div class="panel-body">	
			<div class="form-group">
                <div class="label">
                    <label>标题</label>
                </div>
                <div class="field">
                    <input type="text" class="input" name="title" size="60" value="{$page.title}">
                </div>
            </div>
			 <div class="form-group">
                <div class="label">
                    <label>封面</label>
                </div>
                <div class="field">
                    <input type="text" class="input" id="image" name="image" readonly="readonly" size="38" value="{$page.image}">
                    <a class="button bg-blue button-small  js-img-upload" data="image" id="image_upload" preview="image_preview"><span class="icon-upload"> 上传</span></a>
                    <a class="button bg-blue button-small icon-picture-o" id="image_preview" href="javascript:;" > 预览</a>
                    <div class="input-note">封面图片尺寸360x309</div>
                </div>
            </div>
			<div class="form-group">
                <div class="label">
                    <label>特殊标记的词</label>
                </div>
                <div class="field">
                    <input type="text" class="input" name="word" size="60" value="{$page.word}">
                </div>
            </div>
			<div class="form-group">
                <div class="label">
                    <label>排序</label>
                </div>
                <div class="field">
                    <input type="text" class="input" name="sort" size="60" value="<?php echo $page['sort']?$page['sort']:100;?>">
                </div>
            </div>
			<div class="form-group">
                <div class="label">
                    <label>单页内容</label>
                </div>
                <div class="field">
                    <textarea type="input js-editor" class="input" name="content" style="width: 100%; height: 200px;" >{$page.content}</textarea>
                </div>
            </div>
        </div>
        <div class="panel-foot">
            <div class="form-button">
                <div id="tips"></div>
				<button class="button bg-main" id="ajaxForm" type='submit'>保存</button>
				<if condition='ACTION_NAME eq "addPage"'>	
                <button class="button bg" type="reset">重置</button>
				</if>
            </div>
        </div>
    </div>
</form>
<script>
    KindEditor.ready(function(K) {
        var editor1 = K.create('textarea[name="content"]', {
            cssPath : '__PUBLIC__/keditor/plugins/code/prettify.css',
            uploadJson : '__PUBLIC__/keditor/php/upload_json.php',
            fileManagerJson : '__PUBLIC__/keditor/php/file_manager_json.php',
            allowFileManager : true
        });
        prettyPrint();
    });
</script>

<script type="text/javascript" src="__PUBLIC__/webuploader/FileUpload.js"></script>